
<h2><?php echo $title; ?></h2>
<div class="underline">&nbsp;</div>
<div id="inner-container">
    <?php echo isset($errors) ? '<span class="form-msg-error">'.$errors.'</span>' : '' ?>
    <?php echo validation_errors();?>
    <br/>
     <form class="form" action="<?php echo $form_url?>" method="post" accept-charset="utf-8" enctype="multipart/form-data" >
         <fieldset>
            <legend>Movie Information</legend>
            <div class="grid-6-12">
                <label class="form-lbl" for="title">Title <em class="form-req">*</em></label>
                <input class="form-txt" type="text" name="title" id="title" value="<?php echo set_value('title', isset($movie) ? $movie->title : '')?>" />
            </div>
            <div class="grid-6-12">
                <label class="form-lbl" for="picture">Picture <em class="form-req">*</em></label>
                <input class="form-txt" type="file" name="picture" id="picture"  />
            </div>
            <div class="clear-both"><br/><br/></div>
            <div class="grid-6-12">
                <label class="form-lbl" for="description">Description <em class="form-req">*</em></label>
                <textarea  name="description" id="description"><?php echo set_value('description', isset($movie) ? $movie->description : '')?></textarea>    
            </div>
            
            
            <div class="grid-3-12">
                <label class="form-lbl" for="title">Duration <em class="form-req">*</em></label>
                <input class="form-txt" type="text" name="duration" id="duration" value="<?php echo set_value('duration', isset($movie) ? $movie->duration : '')?>" />
            </div>
            
            <div class="grid-3-12">
                <label class="form-lbl" for="title">Sound <em class="form-req">*</em></label>
                <select name="sound_id" id="sound_id">
                    <?php foreach ($sounds as $key => $sound) :?>
                        <option value="<?php echo $sound->id?>" <?php echo set_select('sound_id', $sound->id, isset($movie) ? ($sound->id == $movie->sound_id) : FALSE)?>><?php echo $sound->name?></option>
                    <?php endforeach;?>
                </select>
            </div>
            
            
            <div class="grid-12-12 form-no-lbl">
                <input class="form-button form-right" type="submit" name="submit" value="submit" id="submit" />
            </div>
            
        </fieldset>
        
    </form>
</div>
